import styles from './index.module.scss'
import cm from 'classnames'

const Page = props => {
  const { data, active } = props

  return (
    <div className={styles.pagination}>
      <div className={styles.items}>
        {data.map((item, index) => {
          return <span key={item.id} className={cm(styles.item, active === index ? styles.itemActive : '')} />
        })}
      </div>
    </div>
  )
}

export default Page
